import request from "@/utils/request"

// 获取礼品卡活动信息
export const GetFunCard = () => request.get(`/s-mall/api/gift-card/index`)

// 获取礼品卡主题列表
export const GetThemeList = () => request.get('/s-mall/admin-api/gift-card-theme/list')

// 获取礼品卡卡片列表
export const GetCardList = (data) => request.get(`/s-mall/admin-api/gift-card-theme/${data}/front/list`)

// 获取礼品卡祝福语列表
export const GetWishList = (data) => request.get(`/s-mall/admin-api/gift-card-theme/${data}/word/list`)

// 获取礼品卡商品信息
export const GetGoodsInfo = () => request.get(`/s-mall/api/gift-card/product`)

// 提交礼品卡订单
export const CreateOrder = (data) => request.post(`/s-mall/api/gift-card/create`, data)

// 安全审核-图片
export const CheckImage = (data) => request.post(`/s-wechat/api/secure/image?imageUrl=` + data.imageUrl);

// 下单订阅
export const Subscribe = data => request.post('/s-mall/api/subscribe/subscribe', data)

// 获取礼品卡订单列表
export const GetOrderList = (data) => request.get(`/s-mall/api/gift-card/list`, data)

// 获取礼品卡订单详情
export const GetOrderInfo = (data) => request.get(`/s-mall/api/gift-card/info/${data}`)

// 填写地址
export const AddAddress = (id, data) => request.post(`/s-mall/api/gift-card/receive/${id}`, data)

// 订单退款
export const Refund = (data) => request.post(`/s-mall/api/refund/create`, data)

// 确认收货
export const Reveive = (data) => request.post(`/s-mall/api/gift-card/receive-confirm`, data)

// 取消订单
export const Cancel = (data) => request.post(`/s-mall/api/order/cancel`, data)

// 删除订单
export const Delete = id => request.post(`/s-mall/api/order/delete/${id}`)

// 获取礼品卡文案信息
export const GetTextByKey = (key) => request.get(`/s-content/api/copywriting/detail/${key}`)